﻿using System;

class Program
{
    static void Main()
    {
        Random random = new Random();
        int[] numbers = Enumerable.Range(1, 100).Select(_ => random.Next(0, 1001)).ToArray();

        var sortedNumbers = numbers.OrderByDescending(x => x).ToArray();

        int sum = sortedNumbers.Sum();

        double average = sortedNumbers.Average();

        Console.WriteLine("排序后的整数数组：");
        foreach (var num in sortedNumbers)
        {
            Console.Write(num + " ");
        }
        Console.WriteLine();
        Console.WriteLine("总和：" + sum);
        Console.WriteLine("平均数：" + average);
    }
}
